Skip to content

fix(codegen): swap ser/de generation for event streams#2072

Open
battledash wants to merge 1 commit into
smithy-lang:mainfrom
battledash:patch-1
Open

fix(codegen): swap ser/de generation for event streams#2072
battledash wants to merge 1 commit into
smithy-lang:mainfrom
battledash:patch-1

Conversation

@battledash

Copy link
Copy Markdown

Hi! Maybe I'm just missing something here, but serialization generation for event streams is backwards? It generates a serializer for input streams and a deserializer for output streams. The generated code doesn't compile because the wrong function exists:

[build:types] src/protocols/Aws_restJson1.ts(62,21): error TS2552: Cannot find name 'de_ServerInputStream'. Did you mean 'se_ServerInputStream'?


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@battledash
battledash requested a review from a team as a code owner June 6, 2026 14:28
@battledash battledash changed the title Swap ser/de generation for event streams fix(codegen): swap ser/de generation for event streams Jun 6, 2026
@battledash

Copy link
Copy Markdown
Author

I thought about this again and realized the current behavior is only incorrect for servers, but this Aws_restJson1.ts file doesn't even exist in the client code. The client also doesn't compile, but for some separate reason:

[build:types] src/AgentClient.ts(317,48): error TS2345: Argument of type '{ runtime: string; defaultsMode: Provider<ResolvedDefaultsMode>; bodyLengthChecker: BodyLengthCalculator; defaultUserAgentProvider: (config?: PreviouslyResolved | undefined) => Promise<...>; ... 31 more ...; httpAuthSchemeProvider: AgentHttpAuthSchemeProvider; } & ... 7 more ... & HttpAuthSchemeResolvedConfig' is not assignable to parameter of type '{ runtime: string; defaultsMode: Provider<ResolvedDefaultsMode>; bodyLengthChecker: BodyLengthCalculator; defaultUserAgentProvider: (config?: PreviouslyResolved | undefined) => Promise<...>; ... 31 more ...; httpAuthSchemeProvider: AgentHttpAuthSchemeProvider; } & ... 9 more ... & EventStreamInputConfig'.
[build:types]   Property 'signer' is missing in type '{ runtime: string; defaultsMode: Provider<ResolvedDefaultsMode>; bodyLengthChecker: BodyLengthCalculator; defaultUserAgentProvider: (config?: PreviouslyResolved | undefined) => Promise<...>; ... 31 more ...; httpAuthSchemeProvider: AgentHttpAuthSchemeProvider; } & ... 7 more ... & HttpAuthSchemeResolvedConfig' but required in type 'PreviouslyResolved'.

when calling resolveEventStreamConfig.

I'm just going to handle events outside of smithy for now lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants